﻿using System;

namespace Script.Net
{
    public class TcpServerSendData
    {
        public TcpClientSocketData Client;
        public TcpTransData TransfData;

        public TcpServerSendData(byte[] orginData, TcpClientSocketData client)
        {
            TransfData = new TcpTransData();
            TransfData.Data = new byte[Const.LengthInfoByteCount+orginData.Length];
            Buffer.BlockCopy(NetUtil.Int2Byte(orginData.Length), 0, TransfData.Data, 0, Const.LengthInfoByteCount);
            Buffer.BlockCopy(orginData, 0, TransfData.Data, Const.LengthInfoByteCount, orginData.Length);
            TransfData.TotalProgress = TransfData.Data.Length;
            TransfData.CurrentProgress = 0;
            Client = client;
        }
    }
}